<template>
  <div class="box">
    <h3>Child2 - 发送数据</h3>
    <button @click="clickHandler">发送数据</button>
  </div>
</template>

<script lang="ts" setup>
import PubSub from 'pubsub-js';

const clickHandler = () => {
  PubSub.publish('receiveData', '我爱你')
}





</script>